package org.youyun56.gpsserver.net;

import java.util.Calendar;
import java.util.Date;

import org.apache.log4j.Logger;
import org.youyun56.gpsserver.CacheFactory;

public class GoodKiller implements Runnable {
    private final static Logger log = Logger.getLogger(GoodKiller.class);

    @Override
    public void run() {
        log.info("start Good killer");
        Calendar c = Calendar.getInstance();
        c.add(-1, Calendar.DAY_OF_YEAR);
        c.set(Calendar.HOUR_OF_DAY, 18);
        c.set(Calendar.MINUTE, 0);
        c.set(Calendar.SECOND, 0);
        c.set(Calendar.MILLISECOND, 0);
        CacheFactory.instance.killGoodBeforeTime(new Date(c.getTimeInMillis()));
    }

}
